Optimal. Leaf size=9 \[ \tanh ^{-1}\left (\sqrt {\sin ^2(x)}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 9, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {3255, 3284, 65,
212} \begin {gather*} \tanh ^{-1}\left (\sqrt {\sin ^2(x)}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 212
Rule 3255
Rule 3284
Rubi steps
\begin {align*} \int \frac {\tan (x)}{\sqrt {1-\cos ^2(x)}} \, dx &=\int \frac {\tan (x)}{\sqrt {\sin ^2(x)}} \, dx\\ &=\frac {1}{2} \text {Subst}\left (\int \frac {1}{(1-x) \sqrt {x}} \, dx,x,\sin ^2(x)\right )\\ &=\text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sqrt {\sin ^2(x)}\right )\\ &=\tanh ^{-1}\left (\sqrt {\sin ^2(x)}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(44\) vs. \(2(9)=18\).
time = 0.02, size = 44, normalized size = 4.89 \begin {gather*} \frac {\left (-\log \left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right )+\log \left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right )\right ) \sin (x)}{\sqrt {\sin ^2(x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.22, size = 8, normalized size = 0.89
method | result | size |
default | \(\arctanh \left (\frac {2}{\sqrt {2-2 \cos \left (2 x \right )}}\right )\) | \(8\) |
risch | \(-\frac {2 \ln \left ({\mathrm e}^{i x}-i\right ) \sin \left (x \right )}{\sqrt {-\left ({\mathrm e}^{2 i x}-1\right )^{2} {\mathrm e}^{-2 i x}}}+\frac {2 \ln \left ({\mathrm e}^{i x}+i\right ) \sin \left (x \right )}{\sqrt {-\left ({\mathrm e}^{2 i x}-1\right )^{2} {\mathrm e}^{-2 i x}}}\) | \(64\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 39 vs.
\(2 (7) = 14\).
time = 0.48, size = 39, normalized size = 4.33 \begin {gather*} \frac {1}{2} \, \left (-1\right )^{2 \, \sin \left (x\right )} \log \left (-\frac {\sin \left (x\right )}{\sin \left (x\right ) + 1}\right ) + \frac {1}{2} \, \left (-1\right )^{2 \, \sin \left (x\right )} \log \left (-\frac {\sin \left (x\right )}{\sin \left (x\right ) - 1}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 17 vs.
\(2 (7) = 14\).
time = 0.38, size = 17, normalized size = 1.89 \begin {gather*} \frac {1}{2} \, \log \left (\sin \left (x\right ) + 1\right ) - \frac {1}{2} \, \log \left (-\sin \left (x\right ) + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\tan {\left (x \right )}}{\sqrt {- \left (\cos {\left (x \right )} - 1\right ) \left (\cos {\left (x \right )} + 1\right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 33 vs.
\(2 (7) = 14\).
time = 0.45, size = 33, normalized size = 3.67 \begin {gather*} \frac {1}{2} \, \log \left (\sqrt {-\cos \left (x\right )^{2} + 1} + 1\right ) - \frac {1}{2} \, \log \left (-\sqrt {-\cos \left (x\right )^{2} + 1} + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.11 \begin {gather*} \int \frac {\mathrm {tan}\left (x\right )}{\sqrt {1-{\cos \left (x\right )}^2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________